-- GENERATED SPELL FOR [Restless Lookout] --


function spell0_31554(pUnit, Event) --@Enraged,Self--
pUnit:FullCastSpellOnTarget(59208,pUnit)
pUnit:RegisterEvent('Sorts_31554', 531, 1)
end

function spell1_31554(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(50933,pUnit)
pUnit:RegisterEvent('Sorts_31554', 652, 1)
end

function spell2_31554(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31554', 10000, 1)
end

function Sorts_31554(pUnit, Event)
local choix_sorts_31554 = math.random(0, 2)
if choix_sorts_31554 == 0 then
pUnit:RegisterEvent('spell0_31554', 1, 1)
end
if choix_sorts_31554 == 1 then
pUnit:RegisterEvent('spell1_31554', 1, 1)
end
if choix_sorts_31554 == 2 then
pUnit:RegisterEvent('spell2_31554', 1, 1)
end
end

function mob31554_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31554', math.random(1500, 3000), 1)
end

function mob31554_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31554_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31554_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31554, 1, 'mob31554_Action')
RegisterUnitEvent(31554, 2, 'mob31554_Leave')
RegisterUnitEvent(31554, 3, 'mob31554_Kill')
RegisterUnitEvent(31554, 4, 'mob31554_Die')
